/* TableDemo.java 
* Created on Dec 19, 2012 
* Author:Mr.Viet
* Phone: 01683430426
* Email: phamvanvietcdhd@gmail.com
*/ 
package com.session5; 

import javax.swing.JScrollPane;
import javax.swing.JTable;

public class TableDemo extends AbstracFrame{
	private JTable tblStudent;
	private String[] columns = {"Ten","Addr","Age"};
	private String[][] data;
	public TableDemo(){
		this.data = new String[4][3];
		this.data[0] = new String[]{"NgocNV","HN","30"};
		this.data[1] = new String[]{"NgocNV","HN","30"};
		this.data[2] = new String[]{"NgocNV","HN","30"};
		this.data[3] = new String[]{"NgocNV","HN","30"};
	}
	public static void main(String[] args) {
		TableDemo f = new TableDemo();
		f.createForm();
		f.showForm();
	}
	@Override
	public void createForm() {
		this.tblStudent = new JTable(this.data,this.columns);
		this.getContentPane().add(new JScrollPane(tblStudent));
	}
}
